/*
 * This is client.
 */

import  java.net.*;
import java.io.*;

/**
 *
 * @author root
 */
public class P6_client {
    
    public static void main(String[] args) throws UnknownHostException, IOException {
        Socket s = new Socket("localhost", 888);
        System.out.println("Connected to server.");
     
        BufferedReader br = new BufferedReader(new InputStreamReader(s.getInputStream()));
     
        String str, str1;        

/*        while ((str = br.readLine())!=null) {
            System.out.println(" "+str);
        }*/
            System.out.println(" "+br.readLine());           
        System.exit(0);       
        br.close();        
        s.close();
    }
}
